<%@ page language="java" contentType="text/html; charset=UTF-8"
 pageEncoding="UTF-8"%>

<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<c:set var="path" value="${pageContext.request.contextPath}"/>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>登录界面</title>
   <script type="text/javascript">
    	$(function(){
    		$("#longin2").click(function(){
    			/** 把表单中input元素直接序列成get请求字符串 */
				var params = $("#indexform").serialize();
    			$.ajax({
    				url:"${path}/weixinbassm/user/addlogin",
    				data:params,
    				dataType:"json",
    				type:"post",
    				async:false,
    				success:function(date){
    					debugger;
    					if(date== 0){ 
    						window.location.href = "${path}/weixinbassm/user/showMyProduct";
						}else{
							alert("账号密码有误")
						}
    				},
    				error:function(){
    					alert("数据加载失败");
    				}
    			});
    		});
    		
    	});
    
    </script>
</head>
<body background="img/3.jpg">
    <center>
    <div align="center"  style="margin-top: 250px">
        <h1  style="color:red">登录</h1>
            <form id="indexform" name="indexForm"  method="post">
                <table border="0">
                    <tr>
                        <td>账号：</td>
                        <td><input type="text" name="username" id="username"></td>
                    </tr>
                    <tr>
                        <td>密码：</td>
                        <td><input type="password" name="password" id="password">
                        </td>
                    </tr>
                </table>
            <br>
                <input id="longin2" type="button" value="登录" style="color:#BC8F8F">
            </form>
            </div>
    </center>
 <div style="width:500px; height:225px; overflow:auto;">
<table cellspacing="0" width="732px"  height="350px" id="dataTableDetail" align="center">
<tr>
                        <td>密码：</td>
                        <td><input type="password" name="password" id="password">
                        </td>
                    </tr>
                    <tr>
                        <td>密码：</td>
                        <td><input type="password" name="password" id="password">
                        </td>
                    </tr>
                    <tr>
                        <td>密码：</td>
                        <td><input type="password" name="password" id="password">
                        </td>
                    </tr>
                    <tr>
                        <td>密码：</td>
                        <td><input type="password" name="password" id="password">
                        </td>
                    </tr>
                    <tr>
                        <td>密码：</td>
                        <td><input type="password" name="password" id="password">
                        </td>
                    </tr>
</table>
  </div>
</div>
 
    
</body>
</html>
